<?php 
define('_VIEW_MODEL_','default');
include("./init.php");
$result = $db->GetRow('select * from no_admin');
//$userId = getUserId();
$friend = "";
$novelsty = "";
$error = "";
require_once INC.'/pageclass.php';
//$pageObj = new Page(34,10,$smartyObj);
$id  = isset($id)?intval($id):"";
$bid = isset($bid)?intval($bid):"";
if(isset($act)&&$act == "add"){
	$title = $subject;
	$cont  = $content;
	$usename = $db->GetRow("select name from {$telper}user where di = '$id'");
	if($titel.length < 3 || $title.length >20){
		$error = "标题错误";
	}
	if( $title.length <20){
		$error = "内容字数太少";
	}	
	$tim = time();
	$db->Execute("insert into {$telper}bbs_cont set `title`='$title',`userid` = '$id',`created` = $tim,`username`='$usename[name]',`content` = '$cont',`column2` = '$bid'");
	header("Location:mybbs.php?id=$id");
}
$isphone = $db->GetRow("select `isphone` from {$telper}user where id = $id");
header("Content-type:text/vnd.wap.wml;charset=utf-8");
$smartyObj->assign("isphone",$isphone['isphone']);
$smartyObj->assign("uid",$id);
$smartyObj->assign("bid",$bid);
$smartyObj->assign("err",$error);
$smartyObj->display("addbss.tpl");

?>